package com.xwzn.resident.adapter;

import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xwzn.resident.R;
import com.xwzn.resident.model.HomeShfw;

import java.util.List;
/**
 * @Description 生活服务适配器
 * @Author HanKaiYang
 * @CreateDate 2019/12/23 11:05
 * @Version 1.0
 */
public class HomeShfwAdapter extends BaseQuickAdapter<HomeShfw, BaseViewHolder> {

    public HomeShfwAdapter(@Nullable List<HomeShfw> data) {
        super(R.layout.shfw_recycler_item,data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, HomeShfw item) {
        Log.d("Image",item.getImage()+"");
        helper.setBackgroundRes(R.id.iv_shfw_rlv,item.getImage())
                .setText(R.id.tv_shfw_rlv,item.getTitle());
    }
}
